//
//  UserinfoManager.m
//  LoginAndRegisterDemo
//
//  Created by lanou3g on 16/4/25.
//  Copyright © 2016年 Liuwx. All rights reserved.
//

#import "UserinfoManager.h"

@implementation UserinfoManager

+ (instancetype)shareManager {
    static UserinfoManager *manager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (!manager) {
            manager = [UserinfoManager new];
        }
    });
    return manager;
}

- (void)loginWithUserDict:(NSDictionary *)dict {
    
    if (dict) {
        [self setValuesForKeysWithDictionary:dict];
        
    }

}
// 退出程序后单例不被释放
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    [[NSUserDefaults standardUserDefaults]setObject:value forKey:key];
    [[NSUserDefaults standardUserDefaults] synchronize];
    
    
    
}


@end
